Page({

  /**
   * 页面的初始数据
   */
  data: {
    collect:false,
    showModel:false,
    list: {
      id: 3122,
      headPic: "../../images/jpg/head_pic.jpg",
      title: "小晗-1337392205",
      top: 1, //置顶
      tag: ["鸡类产品", "鸡翅"],
      tel: 13628367187,
      des: "专业生产鸡翅中，规格：20/30、30/40、40/50克，质量好价格低，诚招全国经销商，欢迎全国经销商，欢迎各位老板前来洽谈合作！15953633988（微信同号）",
      img: [
        "../../images/jpg/preview.jpg",
        "../../images/jpg/preview.jpg",
        "../../images/jpg/preview.jpg",
        "../../images/jpg/preview.jpg"
      ],
      addTime: "2018-02-19 16:46",
      address: "山东省潍坊市昌邑市新兴街",
      see: 3234,
      point: 33,
      pointImg:[
        "../../images/jpg/head_pic.jpg",
        "../../images/jpg/head_pic.jpg",
        "../../images/jpg/head_pic.jpg",
        "../../images/jpg/head_pic.jpg",
        "../../images/jpg/head_pic.jpg",
        "../../images/jpg/head_pic.jpg",
        "../../images/jpg/head_pic.jpg",
        "../../images/jpg/head_pic.jpg",
        "../../images/jpg/head_pic.jpg",
        "../../images/jpg/head_pic.jpg",
        "../../images/jpg/head_pic.jpg",
        "../../images/jpg/head_pic.jpg",
        "../../images/jpg/head_pic.jpg",
        "../../images/jpg/head_pic.jpg",
        "../../images/jpg/head_pic.jpg"
      ],
      message:[
        {
          id:1232,
          headPic:"../../images/jpg/head_pic.jpg",
          name:"万氏猪副产品",
          msg:"好得很",
          addTime:"2018-02-12",
          reply:[
              {
                  id: 1232,
                  headPic: "../../images/jpg/head_pic.jpg",
                  name: "万氏猪副产品",
                  msg: "好得很",
                  addTime: "2018-02-12",
              },
              {
                  id: 1232,
                  headPic: "../../images/jpg/head_pic.jpg",
                  name: "万氏猪副产品",
                  msg: "好得很",
                  addTime: "2018-02-12",
                  reply:[]
              }
          ]
        },
        {
            id: 1232,
            headPic: "../../images/jpg/head_pic.jpg",
            name: "万氏猪副产品",
            msg: "好得很",
            addTime: "2018-02-12",
            reply:[]
        },
        {
            id: 1232,
            headPic: "../../images/jpg/head_pic.jpg",
            name: "万氏猪副产品",
            msg: "好得很",
            addTime: "2018-02-12",
            reply:[]
        }
      ]
    }
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    wx:wx.setNavigationBarTitle({
      title: '牛类产品 肩胛',
      success: function(res) {},
      fail: function(res) {},
      complete: function(res) {},
    })
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {
    
  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {
    
  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {
    
  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {
    
  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {
    
  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {
    
  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {
    
  },
  collect() {
    this.setData({collect :!this.data.collect})
  },
  cancel() {
      this.setData({showModel:false});
  },
  sendMsg() {
      this.setData({ showModel: true });
  },
  postMsg() {
      this.setData({ showModel: false });
  },
  publish(e) {
   wx.switchTab({
       url: '../publish/publish',
   })
  },
  point(e) {
    wx.showModal({
        title: '提示',
        content: '不能重复点赞',
    })
  }
})